#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
const int N = 1010;
int a[N], b[N];
int main()
{
	int n;
	cin >> n;
	for (int i = 1; i <= n; i++)
		cin >> a[i];
	for (int i = 1; i < n; i++)
		b[i] = abs(a[i] - a[i + 1]);
	
	sort(b + 1, b + n);
	int f = 0;
	for (int i = 1; i < n; i++)
	{
		if (b[i] != i)
		{
			f = 1;
			break;
		}
	}
	if (f) cout << "Not jolly" << endl;
	else cout << "Jolly" << endl;
	return 0;
}